
package com.ktkj.init.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;


/**
 * The type Base entity.
 *
 * @author :yanlixiong
 * @date :2021-09-30 14:56:51
 */
@Data
public abstract class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final Integer DEL_FLAG_NORMAL = 0;
    public static final Integer DEL_FLAG_DELETE = 1;

    /**
     * 删除标识（0：正常 1：删除）
     */
    @TableLogic
    protected Integer delFlag = DEL_FLAG_NORMAL;

    /**
     * 创建人
     */
    protected Long createId;

    /**
     * 更新人
     */
    protected Long updateId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Date createDate = new Date();

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Date updateDate;

}
